﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using S7.Net;

namespace DataCollection
{
    internal class Program
    {

       
        static void Main(string[] args)
        {

            Process[] processes = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
            if (processes.Length > 1)
            {
                Thread.Sleep(1000);
                Environment.Exit(1);
                return;

            }
            Console.WriteLine("数据采集中，请不要关闭！！！\n");
            CollectionDriver driver = new CollectionDriver();
            driver.StartCollectionData();       
            Console.ReadLine();
        }       
    }
}
